const printLog = async (ctx, next) => {
  console.log(`---------${new Date().toLocaleString()}---------`)
  const { method, body, url } = ctx.request
  console.log('method:', method)
  console.log('path:', url)
  console.log('payload:', body)
  await next()
  console.log('response:', ctx.body)
  console.log(`---------end---------`)
}

module.exports = {
  printLog
}